package code07_面向对象.封装;

/**
 * @author 黄衡熙
 * @version 1.0
 * @date 2025年07月21日19:01
 */
public class User {
    private int id;
    private String username;
    private String password;
    private String phone;
    private String address;
    private boolean status;

    public User() {
    }

    public User(int id, String username, String password, String phone, String address, boolean status) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.phone = phone;
        this.address = address;
        this.status = status;
    }

    // 赋值方法
    public void setId(int id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    // 取值方法
    public int getId() {
        return id;
    }

    public String getUsername() {
        return username;
    }

    public String getPassword() {
        return password;
    }

    public String getPhone() {
        return phone;
    }

    public String getAddress() {
        return address;
    }

    public boolean getStatus() {
        return status;
    }

    public boolean isStatus() {
        return status;
    }
}
